package com.soft.entity;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 实体：团队成员（表 team_member）
 * 描述：关联 team 与 user，记录成员加入时间、团队内角色及状态。
 */
@TableName("team_member")
public class TeamMember {
     // 主键，自增
    @TableId(type = IdType.AUTO)
    private Integer id;
    
     // 团队 ID（外键）
    private Integer teamId;
    
     // 用户 ID（外键）
    private Integer userId;
    
     // 加入时间
    private LocalDateTime joinTime;
    
     // 团队内角色：leader/member
    private String teamRole; // leader/member
    
     // 成员状态：active/inactive
    private String status; // active/inactive
    
    // 联表查询字段（非表字段，仅用于 @Select 结果映射）
    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private String userEmail;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getTeamId() {
        return teamId;
    }

    public void setTeamId(Integer teamId) {
        this.teamId = teamId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public LocalDateTime getJoinTime() {
        return joinTime;
    }

    public void setJoinTime(LocalDateTime joinTime) {
        this.joinTime = joinTime;
    }

    public String getTeamRole() {
        return teamRole;
    }

    public void setTeamRole(String teamRole) {
        this.teamRole = teamRole;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
    
    public String getUserName() {
        return userName;
    }
    
    public void setUserName(String userName) {
        this.userName = userName;
    }
    
    public String getUserEmail() {
        return userEmail;
    }
    
    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }
}
